package trabajoISW2.presentation.shared;

import trabajoISW2.domain.implementations.Address;

public class AddressMapper {
	

	
	public static AddressDTO createDTO(Address ad){
		AddressDTO dto = null;
		if (ad != null)	
			dto= new AddressDTO(ad.getAddressId(), ad.getAddress(), ad.getZipCode(),
				ad.getCity(), ad.getCountry());
		return dto;
	}
	
	
	public static Address createDomainObject (AddressDTO dto){
		return new Address(dto.getAddress(), dto.getZipCode(),
				dto.getCity(), dto.getCountry());
	}


}
